package top.easyblog.common.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * System unified response code
 *
 * @author frank.huang
 * @since 2021/8/21 22:13
 */
@Getter
@AllArgsConstructor
public enum ShortlinkResultCode {
    // sever internal
    SUCCESS,
    FAIL,
    INVALID_PARAMS,
    NOT_FOUND,
    INTERNAL_ERROR,
    DATA_ACCESS_FAIL,
    PARAMETER_VALIDATE_FAILED,
    REQUIRE_NON_NULL_KAFKA_TOPIC,


    DLOCK_ANNOTATION_NOT_FOUND,
    REQUESTID_ANNOTATION_NOT_FOUND,
    COST_TIME_TRACKER_ANNOTATION_NOT_FOUND,
    ACQUIRED_REDIS_LOCK_FAILED,

    ;

    public String getCode() {
        return this.name().toLowerCase();
    }
}
